﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AMatysiakTest.Cryptography
{
    [TestClass]
    public class SHA1Test
    {
        [TestMethod]
        public void sha1EmptyText()
        {
            string text = "";
            string hash = AMatysiak.Cryptography.Cryptography.SHA1(text);

            Assert.AreEqual("DA39A3EE5E6B4B0D3255BFEF95601890AFD80709", hash);
        }

        [TestMethod]
        public void sha1Text()
        {
            string text = "adam";
            string hash = AMatysiak.Cryptography.Cryptography.SHA1(text);

            Assert.AreEqual("0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a", hash.ToLower());
        }
    }
}
